home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / fractal / kaos.lha / complib / rivector.c < prev    next >
Encoding:
Text File  |  1990-01-23  |  293 b   |  19 lines

  1. /*
  2. ### reallocate memory for a 1-d integer vector ###
  3. */
  4.  
  5. void rivector(v,nl,nh)
  6. int nl,nh;
  7. int *v;
  8. {
  9.     int *vt;
  10.     vt = (int *) realloc(v,(unsigned) (nh - nl + 1) * sizeof(int));
  11.     if (!vt) {
  12.         system_mess_proc(1,"rivector: memory reallocation failure");
  13.         v = vt;
  14.     }
  15.     else {
  16.         v = vt - nl;
  17.     }
  18. }
  19.